package edu.sctu.practice.class02.liqing.assignment02;
/**
 * Created by 123456 on 2015/10/8.
 */
public class Circle {
    private double radius;
    private static int numOfObjects = 0;

    public Circle(double radius) {
        this.radius = radius;
        numOfObjects++;
    }

    public double getArea() {
        return Math.PI * radius * radius;
    }

    public static int getNumOfObjects() {
        return numOfObjects;
    }

    public double getRadius() {
        return radius;
    }

    public static void printCircle(Circle c) {
        System.out.println("圆的面积为" + c.getArea());
        System.out.println("圆的半径是" + c.getRadius());
    }
}


